Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Managing Drawing Engines

QuickDraw 3D RAVE provides routines that you can use to manage drawing engines. For example, you can use these routines to find a drawing engine for a particular device.

QADeviceGetFirstEngine

You can use the QADeviceGetFirstEngine function to get the first drawing engine that can draw to a particular device.

TQAEngine *QADeviceGetFirstEngine (const TQADevice *device);
device
A device, or the value NULL .

DESCRIPTION

The QADeviceGetFirstEngine function returns, as its function result, the first drawing engine that is capable of drawing into the device specified by the device parameter. The first engine is defined to be the first engine that satisfies one of these criteria:

  1. The drawing engine selected by the user (for example, using the RAVE control panel).
  2. The drawing engine that is tightly coupled to the specified device (that is, that can render only to that device).
  3. The drawing engine that accelerates more features than any other drawing engine.

If you pass the value NULL in the device parameter, QADeviceGetFirstEngine returns a drawing engine without regard for its ability to drive any particular device. You can use this technique to find all available engines.

QADeviceGetNextEngine

You can use the QADeviceGetNextEngine function to get the next drawing engine that can draw to a particular device.

TQAEngine *QADeviceGetNextEngine (
                     const TQADevice *device,
                     const TQAEngine *currentEngine);
device
A device, or the value NULL .
currentEngine
A drawing engine.

DESCRIPTION

The QADeviceGetNextEngine function returns, as its function result, the drawing engine that supports the device specified by the device parameter that follows the engine specified by the currentEngine parameter. The value you pass in the currentEngine parameter should have been obtained from a previous call to QADeviceGetFirstEngine or QADeviceGetNextEngine .

If you pass the value NULL in the device parameter, QADeviceGetNextEngine returns a the next drawing engine without regard for its ability to drive any particular device. You can use this technique to find all available engines.

QAEngineCheckDevice

You can use the QAEngineCheckDevice function to determine whether a particular drawing engine can draw into a particular device.

TQAError QAEngineCheckDevice (
                     const TQAEngine *engine,
                     const TQADevice *device);
engine
A drawing engine.
device
A device.

DESCRIPTION

The QAEngineCheckDevice function returns, as its function result, a code that indicates whether the drawing engine specified by the engine parameter can draw into the device specified by the device parameter ( kQANoErr ) or not ( kQAError ).

QAEngineGestalt

You can use the QAEngineGestalt function to get information about a drawing engine.

TQAError QAEngineGestalt (
                     const TQAEngine *engine,
                     TQAGestaltSelector selector,
                     void *response);
engine
A drawing engine.
selector
A selector that determines what kind of information is to be returned about the specified drawing engine. See "Gestalt Selectors" for complete information about the available selectors and the information they return.
response
A pointer to a buffer into which the returned information is copied. Your application is responsible for allocating this buffer. The size and meaning of the data copied to the buffer depend on the selector you pass in the selector parameter.

DESCRIPTION

The QAEngineGestalt function returns, in the response parameter, a buffer of information about features of the type specified by the selector parameter associated with the drawing engine specified by the engine parameter.

SEE ALSO

See "Finding a Drawing Engine" for code illustrating how to call QAEngineGestalt .

QAEngineEnable

You can use the QAEngineEnable function to enable a drawing engine.

TQAError QAEngineEnable (long vendorID, long engineID);
vendorID
A vendor ID.
engineID
A drawing engine ID.

DESCRIPTION

The QAEngineEnable function enables the drawing engine specified by the vendorID and engineID parameters.

QAEngineDisable

You can use the QAEngineDisable function to disable a drawing engine.

TQAError QAEngineDisable (long vendorID, long engineID);
vendorID
A vendor ID.
engineID
An engine ID.

DESCRIPTION

The QAEngineDisable function disables the drawing engine specified by the vendorID and engineID parameters.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |